'use strict';


module.exports = app => {
  const { router, controller } = app;

  // 验证码快捷登录 or 创建用户 不需要token
  router.post('/api/news/pc-web/user/quick', controller.news.pcWeb.user.quickUser);

  // 账号密码登录
  router.post('/api/news/pc-web/user/login', controller.news.pcWeb.user.accountAndPasswordToLogin);

  // 验证码快捷修改密码
  router.patch('/api/news/pc-web/user/quickUpdatePassword', controller.news.pcWeb.user.quickUpdatePassword);

  // github login 未启用
  router.post('/api/news/pc-web/user/gitHubLogin', controller.news.pcWeb.user.gitHubLogin);

  // WeChat Login 未启用
  router.post('/api/news/pc-web/user/weChatLogin', controller.news.pcWeb.user.WeChatLogin);

  // 关注用户
  router.post('/api/news/pc-web/user/focus', controller.news.pcWeb.user.addFocus);

  // 取消关注用户
  router.delete('/api/news/pc-web/user/focus/:follerd_id', controller.news.pcWeb.user.destroyFocus);

  // 根据id判断是否关注了用户
  router.get('/api/news/pc-web/user/focus/:follerd_id', controller.news.pcWeb.user.getFocusById);

  // 获取用户的关注列表 根据用户id
  router.get('/api/news/pc-web/user/followings/:user_id', controller.news.pcWeb.user.followings);

  // 获取用户的粉丝列表 根据用户id
  router.get('/api/news/pc-web/user/followers/:user_id', controller.news.pcWeb.user.followers);

  // 获取用户主页个人信息
  router.get('/api/news/pc-web/user/HomePage/:user_id', controller.news.pcWeb.user.getUserHomePage);

};
